/**
 * Created on Mar 08, 2010
 *
 * Copyright (c) 2010, The MAGI Project.
 * All rights reserved.
 *
 * This software is open-source under the GNU General Public License v3;
  */

package org.braincore.common.language;

import org.braincore.common.BrainData;

/**
 * Represents the language brain data.
 * @author Carlos Giraldo carlgira@gmail.com
 */
public class LanguageData implements BrainData
{
    private String _data;

    public LanguageData(String _data) {
        this._data = _data;
    }

    public String getData() {
        return _data;
    }

    public void setData(Object _data) {
        this._data = _data.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final LanguageData other = (LanguageData) obj;
        if ((this._data == null) ? (other._data != null) : !this._data.equals(other._data)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 97 * hash + (this._data != null ? this._data.hashCode() : 0);
        return hash;
    }

}
